package com.abel.mvc.controller;

import com.abel.mvc.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author abel.he
 * @data 2018/8/11 10:11
 */
@Controller
@RequestMapping("/msg")
public class MessageController {

    @Autowired
    MessageService messageService;

    @GetMapping("/send")
    public String sendMessage(String from, String to, String subject, String content) {
        messageService.sendMessage(from, to, subject, content);
        return "success";
    }

}
